#!/usr/bin/env bash

bash /data/data/com.termux/files/home/storage/shared/jd/git_pull.sh >> /data/data/com.termux/files/home/storage/shared/jd/log/git_pull.log 2>&1

cp -f /data/data/com.termux/files/home/storage/shared/jd_my/clear.sh /data/data/com.termux/files/home/storage/shared/jd/clear.sh
bash /data/data/com.termux/files/home/storage/shared/jd/clear.sh >> /data/data/com.termux/files/home/storage/shared/jd/log/clear.log 2>&1

cp -f /data/data/com.termux/files/home/storage/shared/jd_my/jd.sh /data/data/com.termux/files/home/storage/shared/jd/jd.sh

## 在日志中记录时间与路径
echo -n "系统时间："
echo $(date "+%Y-%m-%d %H:%M:%S")
if [ "${TZ}" = "UTC" ]; then
  echo -n " 北京时间："
  echo $(date -d "8 hour" "+%Y-%m-%d %H:%M:%S")
fi
echo -e "update jd shell, script and clear done!"